TypeScript: Generic types for functions treat parameters as any despite declaring them otherwise

visit shbcf.ru